package gc.benchmark;

import gc.benchmark.R;
import android.app.Activity;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.widget.TextView;

public class Wrapper extends Activity
{

  private TextView mTextView1;

  public static Handler mHandler;
  public static final int GUINOTIFIER = 0x1234;

  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState)
  {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    mTextView1 = (TextView) findViewById(R.id.myTextView1);

    mHandler = new Handler()
    {
      public void handleMessage(Message msg)
      {
        switch (msg.what)
        {
          case Wrapper.GUINOTIFIER:
            mTextView1.setText(GCBenchmark.out);
            break;
        }
        super.handleMessage(msg);
      }
    };
  }

  @Override
  public void onResume()
  {
    super.onResume();
    new Thread()
    {
      public void run()
      {

        GCBenchmark.benchmark();

      }
    }.start();
  }

}
